Conversation
…t domain and subdomain levels" Two races were observed in CI: 1. renameDomain reloaded the page before the browser URL had been updated to the new FQN, so the reload hit the old (now 404) URL and the app redirected to the domains list. Wait for the URL to reflect the new name before reloading. 2. The search-index reindex for data products can take longer than 30s when the parent domain is renamed under CI load. Raise the poll budget to 90s.
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the flaky Playwright test Domains › Rename domain with data products attached at domain and subdomain levels by preventing a reload from occurring before the SPA updates the browser URL to the renamed domain’s new route.
Changes:
- Add a
page.waitForURL(...)synchronization point after the rename PATCH completes to ensure the URL reflects the new domain name before reloading.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Code Review ✅ ApprovedUpdates the Rename domain test case to resolve flakiness when data products are attached. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|
🟡 Playwright Results — all passed (28 flaky)✅ 3653 passed · ❌ 0 failed · 🟡 28 flaky · ⏭️ 89 skipped
🟡 28 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
Changes have been cherry-picked to the 1.12.6 branch. |
… domain and subdomain levels (#27452) * test(domains): fix flaky "Rename domain with data products attached at domain and subdomain levels" Two races were observed in CI: 1. renameDomain reloaded the page before the browser URL had been updated to the new FQN, so the reload hit the old (now 404) URL and the app redirected to the domains list. Wait for the URL to reflect the new name before reloading. 2. The search-index reindex for data products can take longer than 30s when the parent domain is renamed under CI load. Raise the poll budget to 90s. * Revert search-index poll timeout bump, keep only URL-wait fix * Update openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update openmetadata-ui/src/main/resources/ui/playwright/utils/domain.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> (cherry picked from commit 57e558d)



Summary
Stabilize
Domains › Rename domain with data products attached at domain and subdomain levels(playwright/e2e/Pages/Domains.spec.ts:1974).Root cause
In
renameDomain(playwright/utils/domain.ts), after the PATCH resolves we immediately callpage.reload(). The app updates the browser URL to the new FQN asynchronously from React state, so under load the reload can fire while the URL is still the old FQN. That reload hits a 404, the app redirects to/domainlist, and the subsequententity-header-nameassertion times out against an empty page.Seen in CI run
24541920436/1130/1: first attempt's screenshot shows "No data available" on the domains list at the momenttoContainTextfailed (Domains.spec.ts:2033).Fix
Wait for the URL to reflect the new name before reloading:
Note
There's a second flake surface in the same test —
verifyDataProductsCountpolls the data-product search index for 30s after rename and occasionally sees0where it expects2(the cascading reindex ofdomains.fullyQualifiedNameon child data products is slow under CI load). That's a real backend-timing concern, not a test-logic race, and is left out of this PR intentionally. Worth tracking as a follow-up (either lift the poll budget or investigate whether the reindex cascade can be nudged).Test plan
npx playwright test Domains.spec.ts -g "Rename domain with data products" --repeat-each=5 --workers=1renameDomaincallers still pass (the helper change only adds a wait, doesn't remove any step).🤖 Generated with Claude Code